Wave-packet approach to full counting statistics