It is perfectly legal. There is no law requiring employees to be present while their money or other assets are counted, and employers are free to set workplace rules, policies, and procedures. An employer can decide who performs this function, and it does not have to include you.