One of my colleague asked this question and I found that it is very easy to get the custom lines count in your server. Here is how.
1. Goto Tcode /SDF/CD_CCA =>Select "SAP Clone Finder"
2. In the field "Customer Namespace" provide "/0CUST/".
3. Keep all other fields empty.
4. Select "Similarity Check Off"
5. Run. (F8)
6. Select the "Object Size" column and hit "Total" button.
You have your Count of Custom Code in your system.