you want to be changing the scope variable and not the local val variable.
<input type="text" ng-model="potatoCount" ng-keyup="onKeyup($event, 'potatoCount')" />
function MyCtrl($scope) {
$scope.onKeyup = function (evt, val) {
if(evt.keyCode === 40) {
--$scope[val];
console.log("decrementing val");
} else if (evt.keyCode === 38) {
++$scope[val];
console.log("incrementing val");
}
};
$scope.potatoCount = 42;
}