api: counter: Fix build issue with C++
api: counter: Fix build issue with C++

When compiling with CPP, compiler complains about multiple implicit
type convertion:

error: invalid conversion from ‘const void*’ to ‘const counter_config_info*’
...

Let's fix that using explicit casting.

Signed-off-by: Loic Poulain <7dbc6498a90ff1ada42fc224430b4f763baa5c5c@linaro.org>

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