Add getLayerCount method