Counting perfect squares
If A was not included in the observed range, you wouldn't need the if (A == sqrtA * sqrtA) part, right? So, let's use that: instead of checking the range {A,A+1,...,B}, check the range {A-1,A,...,B}. Since you're working with integers, the two are the same:

        int sqrtA = (int)Math.Sqrt(A-1);
        int sqrtB = (int)Math.Sqrt(B);
        count = sqrtB - sqrtA;


A minor detail: when returning a predefined constant, I prefer writing the constant itself, not a variable initialized to that value:

        if (A &lt; 0 &amp;&amp; B &lt; 0) return 0; 


It seems more readable to me.

Also, I would replace two main if-s with if (B &lt; 0 || B &lt; A) return 0. This gives the same result, but in a cleaner way.

So, my version would be:

public static int CountPerfectSquares(long A, long B)
{            
    // Return zero if there are obviously no perfect squares
    if (B &lt; 0 || B &lt; A) return 0;

    // Reset the lower bound if required
    if (A &lt;= 0) A = 1;

    // Find the number of perfect squares between A &amp; B (INCLUSIVE)
    return (int)Math.Sqrt(B) - (int)Math.Sqrt(A-1);  // Now giving the correct count, even when the lower bound value is a whole square (for exp. CountPerfectSquares(1, 25))
}