code: def numConnects(self, layerName):
          
          count = 0
          if self[layerName].active: 
              count += 1 # 1 = bias
              for connection in self.connections:
                  if connection.active and connection.fromLayer.active and connection.toLayer.name == layerName:
                      count += connection.fromLayer.size
          return count
docs: Number of incoming weights, including bias. Assumes fully connected.