counter for nights of a stay
Used after a number to count how many nights one stays, e.g. at a hotel or inn. Often used with 一泊, 二泊, etc.
京都に二泊する予定です。
I plan to stay two nights in Kyoto.
一泊二日
I went on a two-night, three-day trip.
I went on a one-night, two-day trip.
overnight stay; lodging
Rare standalone noun meaning an overnight stay or lodging. In modern Japanese, 宿泊 or 滞在 are much more common.
この町での泊は初めてです。
This is my first overnight stay in this town.
京都に三泊した。
I stayed three nights in Kyoto.
This hotel costs 8,000 yen per night.
宿泊 is the common noun for an overnight stay, while 泊 as a standalone noun (rather than counter) is rare in modern Japanese.
泊 counts the nights of a continuous stay (as in 二泊三日), while 晩 just counts nights in general without implying a trip or lodging.
In phrases like 二泊三日, 泊 counts the nights stayed while 日 counts the days spanned, and learners often mix up which number goes with which.
The kanji 泊 originally means 'to stay overnight' or 'anchorage'. The reading はく is the on'yomi. The counter use developed naturally from the noun meaning.