How shiva is counted
Shiva, the seven days of mourning, begins right after the burial. The day of the burial counts as the first day, even if only a short time is left of it, and shiva ends on the morning of the seventh day, after Shacharit. Shabbat counts as one of the seven days, but there is no public mourning on Shabbat.
When a festival falls during shiva
If Rosh Hashanah, Yom Kippur, Sukkot, Pesach or Shavuot begins after the mourning has started, the festival cancels the rest of the shiva. If the burial takes place during a festival (including Chol HaMoed), shiva begins after the festival. Outside Israel the last day of the festival, the second day of Yom Tov, counts as the first day of shiva.
Shloshim
The Shloshim are the first thirty days from the burial, including the shiva. A festival that begins after the shiva has ended also ends the Shloshim. When a festival cancels the shiva, the Shloshim are shortened in a way that depends on the festival: please ask your rabbi for the exact day.
Questions
Does the day of the funeral count as a day of shiva?
Yes. Even a short time of mourning after the burial counts as the first day.
What if the death was after sunset?
The Hebrew date is already the next day ("Or L'…"). Shiva itself is counted from the burial, but the Hebrew date matters for the Yahrzeit.
Is this a halachic ruling?
No. It follows the common rules for the Diaspora (Shulchan Aruch, Yoreh De'ah 399). Every family should confirm the details with its rabbi.