#include <LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);

int cislo = 0;
bool test1 = true;
bool test2 = true;

void setup() {
  lcd.begin(16,2);
  DDRB &=~(1<<3);
  PORTB |= 1<<3;
  DDRB &=~(1<<4);
  PORTB |= 1<<4;
}

void loop() {
  if( (PINB&(1<<3)) == 0 && test1 == true ){
    test1 = false;
    cislo++;
    lcd.clear();
    lcd.print(cislo);
  }
  else if( (PINB&(1<<3)) != 0 && test1 == false){
    test1 = true;
  }

  if( (PINB&(1<<4)) == 0 && test2 == true){
    test2 = false;
    cislo--;
    lcd.clear();
    lcd.print(cislo);
  }
  else if( (PINB&(1<<4)) != 0 && test2 == false){
    test2 = true;
  }
}