How to get the Count from an dynamic Query.