def get_room_count(self):

        def f(txn):
            sql = "SELECT count(*)  FROM rooms"
            txn.execute(sql)
            row = txn.fetchone()
            return row[0] or 0

        return self.runInteraction(
            "get_rooms", f
        )
Retrieve a list of all rooms
dataset/ETHPy150Open matrix-org/synapse/synapse/storage/room.py/RoomStore.get_room_count