Fix some issues on count skill by term service : validate input/output data