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.
The kanji 泊 originally means 'to stay overnight' or 'anchorage'. The reading はく is the on'yomi. The counter use developed naturally from the noun meaning.