add  performBlockAndWait when call countForFetchRequest method.

countForFetchRequest method should be call in performBlock. Otherwise，when multiple threads call, deadlock will occur.