I want to access layout count which are present in slide master.
const slideMaster = context.presentation.slideMasters.getItem(0).layouts;
The PowerPoint.SlideMasterCollection class offers the items
property which you can use the count the number of layouts in the SlideMasterCollection. The Add slides to a presentation snippet shows some strategies for working with layouts.