change way to get nb of interfaces