An array is defined of assumed elements like I have array like String[] strArray = new String[50];.
Now from 50 elements only some elements
Using LINQ you can try
int count = strArray.Count(x => x != null);