Added new API that returns list length.

Change-Id: I6f9299e50ab135cca945165d2a18b621daa5d73a