Added test code for cursor.count