I forgot the password to unlock my iphone

I have an iPhone 4. And yesterday, my sister was checking all my personal stuff and I was annoyed so I decided to set a password. I just typed really fast and I forgot to look at my phone. It was up supposed to be 1845 but I think I typed too fast, twice. And when I tried to open it, it said wrong password. I tried again and again and now it says, "iPhone is disabled connect to iTunes" my phone is jailbroken and I have lots of important contacts, photos, apps, and stuff like that. And I don't know what to do. And do we need to download a backup for it? Or is there any other way? My friend told me to take the SIM card out to restore it. But I don't think it will work. Help?

Added (1). It's ios4.1. I don't have my own apple ID and my laptop had to be repaired the other day and I can't resume all my apps.

Added (2). *resync. Will my jailbroken apps disappear? I also downloaded a few apps with my dads account. I'm stupid

I think you need to restart it. You can't take your IPhone to they Apple Store since it's jailbroken.

Bypass & Reset the iPhone Passcode (it removes files)

As mentioned above, this also will work on other iOS devices.
1.Disconnect the USB cable from the iPhone, leave the other end connected to your Mac/PC
2.Launch iTunes
3.Press and hold the Home and Power button on the top of the iPhone to turn off the device
4.Press and continue to hold the Home button while you reconnect the USB cable to your iPhone, this will cause the iPhone to turn on
5.Continue to hold the Home button until an alert message in iTunes appears that an iPhone in recovery mode has been detected

This is the general message you will see:

iphone recover mode detected

Now that the iPhone is in recovery mode and has been detected by iTunes, you must restore the device:
•From iTunes, look under the "Summary" tab
•Click on the "Restore" button within iTunes

This will wipe all files, settings, and apps from the iPhone, including the passcode. When the restore is finished, the iPhone will be at the factory settings. At this point you can choose to start from scratch or to restore the iPhone from a backup that is either stored on the computer with iTunes, or by using an Apple ID and restoring from an iCloud backup. Both of those are very simple processes and you will have the option to do so once the device has been rebooted and is back at factory settings, where the initial setup screens will greet you.

Hope this is what you were looking for.