Access Total Number of Orders on Bid/Ask

Is there a way to access the total number of “bids” and the total number of “ask” limit orders that are on the book?

Looking to make an indicator that is showing total bids /total ask on the orderbook for any given period