local count = 0 if not fs.exists(".itemCount") then countFile = fs.open(".itemCount", "w") countFile.write(count) countFile.close() else countFile = fs.open(".itemCount", "r") count = tonumber(countFile.readLine()) countFile.close() end term.clear() while true do term.setCursorPos(3,2) print("Total items passed: "..count.." ") os.pullEvent("redstone") if rs.testBundledInput("bottom", color.black) then count = count + 1 countFile = fs.open(".itemCount", "w") countFile.write(count) countFile.close() end end