[counters] Add register with size for strings

Counters are now using fixed buffer for strings. This will avoid race condition if we try to free the value while sampling it.