public Integer getNatMappingsCount() throws IOException, UPNPResponseException {
Integer rtrval = null;
StateVariableMessage natTableSize = msgFactory.getStateVariableMessage( "PortMappingNumberOfEntries" );
try {
StateVariableResponse resp = natTableSize.service();
rtrval = new Integer( resp.getStateVariableValue() );
} catch ( UPNPResponseException ex ) {
// 404 can happen if device do not implement state variables queries
if ( ex.getDetailErrorCode() != 404 ) {
throw ex;
}