handleCount in frontend made atomic. Removed unused variable.