The mapping from the last lessons cannot tell you how many entries exist, or what the third one was. Nothing iterates it.
Declare a list:
uint256[] public notes;
Then push onto it inside sign:
notes.push(note);
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract Guestbook {
function sign(uint256 note) external {
}
function count() external view returns (uint256) {
return 0;
}
function noteAt(uint256 index) external view returns (uint256) {
return 0;
}
}