drivers: counter: Fix get_value verification handler
drivers: counter: Fix get_value verification handler

z_vrfy_counter_get_value should check the size of memory pointed to
ticks and not the size of the pointer.

Fixes: #22431
Coverity CID :207984

Signed-off-by: Flavio Ceolin <979b9165500b0741b9d0500e2efd74fc1547bff7@intel.com>

finikorg/zephyr,galak/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,nashif/zephyr,Vudentz/zephyr,nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr