changed count setter so its atomic