validate counter_type when posting samples

check to ensure counter_type is valid when posting samples via API

Change-Id: I097c54f6b410c67b117b07eaf146828766f4852a
Fixes: bug #1221007
Merge "validate counter_type when posting samples"