encoder: add support to query the number of encoders which are in use