Adding count operation upon query.